package org.jeecg.modules.leave.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.activiti.engine.task.Task;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecg.modules.workflow.vo.MyApplyVO;
import org.jeecg.modules.workflow.vo.MyDoneVO;
import org.jeecg.modules.workflow.vo.MyTodoVO;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Transient;

/**
 * @Description: ag_leave
 * @Author: jeecg-boot
 * @Date:   2020-05-18
 * @Version: V1.0
 */
@Data
@TableName("ag_leave")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ag_leave对象", description="ag_leave")
public class AgLeave implements Serializable {
    private static final long serialVersionUID = 1L;

    /**id*/
    @TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "id")
    private String id;
	/**申请人*/
	@Excel(name = "申请人", width = 15)
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "申请人")
    private String applicant;
	/**审批人*/
	@Excel(name = "审批人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "审批人")
    private String auditing;

	@TableField(exist = false)
	private String nextUser;

	/**请假开始时间*/
	@Excel(name = "请假开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "请假开始时间")
    private Date leaveStarttime;
	/**请假结束时间*/
	@Excel(name = "请假结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "请假结束时间")
    private Date leaveEndtime;
	/**请假原因*/
	@Excel(name = "请假原因", width = 15)
    @ApiModelProperty(value = "请假原因")
    private String reason;
	/**审批状态*/
	@Excel(name = "审批状态", width = 15)
    @ApiModelProperty(value = "审批状态")
    @Dict(dicCode = "auditStatus")
    private Integer status;
    /** 流程实例id */
    @Excel(name="流程实例",width=25)
    @ApiModelProperty(value = "流程实例")
    private String processInstanceId;

    /**创建人*/
    @ApiModelProperty(value = "创建人")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    private String createBy;
    /**创建时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**修改人*/
    @ApiModelProperty(value = "修改人")
    private String updateBy;
    /**修改时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    private String taskId;

    @TableField(exist = false)
    private MyApplyVO myApplyVO;
    @TableField(exist = false)
    private MyTodoVO myTodoVO;
    @TableField(exist = false)
    private MyDoneVO myDoneVO;

    @TableField(exist = false)
    private Date endTime;
    @TableField(exist = false)
    private String auditStatus;
    @TableField(exist = false)

    @Dict(dicCode = "processStatus")
    private Integer processStatus;

    @TableField(exist = false)
    private String taskName;
    @TableField(exist = false)
    private String taskMsg;
    @TableField(exist = false)
    private String currtTaskId;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private String auditUser;

    @Excel(name = "销假时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    Date xiaojTime;

    // 组织机构 code
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    String orgCode;

    @Dict(dicCode = "leaveType")
    String leaveType;

    // 直接领导，销假的时候需要他来审
    String firstAudit;

    @TableField(exist = false)
    String nodeName;

    @TableField(exist = false)
    private String applyer;

    // 告警标志 1已经告警
    String warningFlag;

    @ApiModelProperty(value = "备注")
    private String beizhu;

    // 目的地
    String mudd;

    // 联系电话
    String mobile;

    // 出勤方式
    @Dict(dicCode = "chuqfs")
    String chuqfs;

    @TableField(exist = false)
    String xujbh;
}
